package com.ccrfid.rmc6.service.personnel;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.personnel.PersonnelMutualGroupEntity;
import com.ccrfid.rmc6.entity.personnel.PersonnelMutualGroupMemberEntity;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface MutualGroupService {
    //查询互监组
    Page<PersonnelMutualGroupEntity> getPersonnelMutualGroupPage(SearchCriteria criteria, Pageable pageable);

    //添加互监组
    PersonnelMutualGroupEntity createPersonnelMutualGroup(PersonnelMutualGroupEntity entity) throws AppException;

    //修改互监组
    PersonnelMutualGroupEntity updatePersonnelMutualGroup(Long groupId, PersonnelMutualGroupEntity entity) throws AppException;

    //删除互监组
    Boolean deletePersonnelMutualGroup(Long groupId) throws AppException;

    //获取互监组相关人员
    List<PersonnelMutualGroupMemberEntity> getPersonnelMutualGroupMemberList(Long groupId);

    //向互监组中加入某个人员
    PersonnelMutualGroupMemberEntity createPersonnelMutualGroupMember(Long groupId, PersonnelMutualGroupMemberEntity entity) throws AppException;

    //从互监组中删除某个人员
    Boolean deletePersonnelMutualGroupMember(Long groupId, Long memberId) throws AppException;
}
